package com.rimuru.a09;

import com.rimuru.a09.service.MyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class A09 {
    private static final Logger log = LoggerFactory.getLogger(A09.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext context =
                SpringApplication.run(A09.class, args);

        MyService service = context.getBean(MyService.class);
        log.debug("service class: {}", service.getClass());
        service.foo();
        context.close();
    }
}